#include "Control/GUIWindowFactoryManager.h"
#include "Renderer/GUIWindowRendererManager.h"
#include "Control/GUIControlHeader.h"
#include "Control/GUIRendererHeader.h"

namespace YGUI
{
    void WindowFactoryManager::initDefaultFactory(void)
    {
        m_factories.insert(std::make_pair(Window::WidgetTypeName, DefWindowFactory<Window>::getPtr()));
        m_factories.insert(std::make_pair(FrameWindow::WidgetTypeName, DefWindowFactory<FrameWindow>::getPtr()));
        m_factories.insert(std::make_pair(Titlebar::WidgetTypeName, DefWindowFactory<Titlebar>::getPtr()));
        m_factories.insert(std::make_pair(PushButton::WidgetTypeName, DefWindowFactory<PushButton>::getPtr()));

        addMappedType("FrameWindow", "FrameWindow", "FrameWindow");
        addMappedType("Titlebar", "Titlebar", "Titlebar");
        //addMappedType("PushButton", "Button", "Button");
    }

    void WindowRendererManager::initDefaultRenderer(void)
    {
        m_rendererFactories.insert(std::make_pair(FrameWindowRenderer::TypeName, DefRendererFactory<FrameWindowRenderer>::getPtr()));
        m_rendererFactories.insert(std::make_pair(TitlebarRenderer::TypeName, DefRendererFactory<TitlebarRenderer>::getPtr()));
        m_rendererFactories.insert(std::make_pair(ButtonRenderer::TypeName, DefRendererFactory<ButtonRenderer>::getPtr()));
    }
};